package com.infinitus.multids.domain.secondary;
import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;


//@Entity
//@Table(name="product_info")
//@NamedQueries({@NamedQuery(name="ProductInfo.findAll", query="SELECT e FROM ProductInfo e"),
//	@NamedQuery(name="ProductInfo.distinct", query="SELECT new ProductInfo(e.productCode, e.productFullName ) FROM ProductInfo e group by e.productCode, e.productFullName ")})
public class ProductInfo  implements Serializable  {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2918285791442206289L;

	public static final String TITLE = "product_full_name_";

//	@Id
	private String productCode;
	private String productType;
	private String productSubType;
	private String productFullName;
	private String productShortName;
	private String productListType;
	private String productOnSaleDate;
	private String unitMeasure;
	private Float unitWeight;
	private String packageUnit;
	private Integer packageQty;
	private Float packageWeight;
	private Integer daysOfValidity;
	private Integer isEnabled;
	
	
	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public String getProductType() {
		return productType;
	}

	public void setProductType(String productType) {
		this.productType = productType;
	}

	public String getProductSubType() {
		return productSubType;
	}

	public void setProductSubType(String productSubType) {
		this.productSubType = productSubType;
	}

	public String getProductFullName() {
		return productFullName;
	}

	public void setProductFullName(String productFullName) {
		this.productFullName = productFullName;
	}

	public String getProductShortName() {
		return productShortName;
	}

	public void setProductShortName(String productShortName) {
		this.productShortName = productShortName;
	}

	public String getProductListType() {
		return productListType;
	}

	public void setProductListType(String productListType) {
		this.productListType = productListType;
	}

	public String getProductOnSaleDate() {
		return productOnSaleDate;
	}

	public void setProductOnSaleDate(String productOnSaleDate) {
		this.productOnSaleDate = productOnSaleDate;
	}

	public String getUnitMeasure() {
		return unitMeasure;
	}

	public void setUnitMeasure(String unitMeasure) {
		this.unitMeasure = unitMeasure;
	}

	public Float getUnitWeight() {
		return unitWeight;
	}

	public void setUnitWeight(Float unitWeight) {
		this.unitWeight = unitWeight;
	}

	public String getPackageUnit() {
		return packageUnit;
	}

	public void setPackageUnit(String packageUnit) {
		this.packageUnit = packageUnit;
	}

	public Integer getPackageQty() {
		return packageQty;
	}

	public void setPackageQty(Integer packageQty) {
		this.packageQty = packageQty;
	}

	public Float getPackageWeight() {
		return packageWeight;
	}

	public void setPackageWeight(Float packageWeight) {
		this.packageWeight = packageWeight;
	}

	public Integer getDaysOfValidity() {
		return daysOfValidity;
	}

	public void setDaysOfValidity(Integer daysOfValidity) {
		this.daysOfValidity = daysOfValidity;
	}

	public Integer getIsEnabled() {
		return isEnabled;
	}

	public void setIsEnabled(Integer isEnabled) {
		this.isEnabled = isEnabled;
	}

	@Override
	public String toString() {
		return "ProductInfo [productCode=" + productCode + ", productType="
				+ productType + ", productSubType=" + productSubType
				+ ", productFullName=" + productFullName
				+ ", productShortName=" + productShortName
				+ ", productListType=" + productListType
				+ ", productOnSaleDate=" + productOnSaleDate + ", unitMeasure="
				+ unitMeasure + ", unitWeight=" + unitWeight + ", packageUnit="
				+ packageUnit + ", packageQty=" + packageQty
				+ ", packageWeight=" + packageWeight + ", daysOfValidity="
				+ daysOfValidity + ", isEnabled=" + isEnabled + "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((productCode == null) ? 0 : productCode.hashCode());
		result = prime * result
				+ ((productFullName == null) ? 0 : productFullName.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ProductInfo other = (ProductInfo) obj;
		if (productCode == null) {
			if (other.productCode != null)
				return false;
		} else if (!productCode.equals(other.productCode))
			return false;
		if (productFullName == null) {
			if (other.productFullName != null)
				return false;
		} else if (!productFullName.equals(other.productFullName))
			return false;
		return true;
	}
	
}
